package lesson04;

public class TestMain1 {
    public static void main(String[] args) {
//        abkkcdkkefkkskk
        String str = "abkkcdkkefkkskk";
        char[] cs1 = str.toCharArray();
        char[] cs2 = new char[cs1.length];
        int indexcs2 = 0;
        for (int j = 0;j < cs1.length; j++) {
            int flg = 0;
            for (int i = 0; i < cs2.length; i++) {
                if (cs2[i] == cs1[j]) {
                    flg++;
                    break;
                }
            }
            if (flg != 0) {
                continue;
            } else {
                cs2[indexcs2++] = cs1[j];
            }
            int count = 1;
            for (int i = j; i < cs1.length - 1; i++) {
                if (cs1[j] == cs1[i + 1]) {
                    count = count + 1;
                }
            }
            System.out.println(cs1[j] + "@" + count);
        }
    }

}
